<template>
    <div>
        <!-- 顶部导航栏 -->
        <div class="handNav">
            <div class="gobackIcon" @click="back">
                <img src="../../../../assets/images/goback.png" alt="">
            </div>
            <div class="pageTitle">
                    <p>购物车</p>
            </div>
            <div class="icon" >
                <i class="el-icon-service"></i>
            </div>
        </div>

        <!-- 满减 -->
        <div class="full-reduction">
            <div class="full-reduction-chinese">
                满额减
            </div>
            <div class="full-reduction-conditions">
                购物满299减50
            </div>
        </div>

        <!-- 已经加入购物车的商品 -->
        <div class="shoppingGoods-box">

            <div>
                <div class="shoppingGoods">
                    <div class="xuanzhong" @click="choose">
                        <div class="unchecked" v-show="unchecked" ></div>
                        <div class="checked" v-show="checked" ><i class="el-icon-circle-check"></i></div>
                    </div>
                    <div class="shoppingGoodsInfo">
                        <div class="shopping-img">
                            <img src="../../../../assets/images/swiper3.jpg" alt="">
                        </div>
                        <div class="shopping-info">
                            <div class="shopping-info-name">回到家哈电视剧安康市大的哈老客户阿萨德阖家安康阿达</div>
                            <div class="shopping-info-color">颜色：055</div>
                            <div class="shopping-info-priceandnum">
                                <div class="shopping-info-price">￥ 364</div>
                                <div class="shopping-info-num">
                                    <div class="shopping-info-num-reduce">-</div>
                                    <div class="shopping-info-num-count">1</div>
                                    <div class="shopping-info-num-add">+</div>
                                </div>
                                <div class="shopping-info-reduce"><i class="el-icon-delete-solid"></i></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="underLine"></div>
            </div>

            

        </div>

        <!-- 底部加入购物车 -->
        <div class="settlement">
            <div class="chooseAll" @click="chooseAll">
                    <div class="unchecked" v-show="uncheckedAll" ></div>
                    <div class="checked" v-show="checkedAll" ><i class="el-icon-circle-check"></i></div>
                    <div class="checked-word">全选</div>
            </div>
            <div class="priceAll">
                总计: <span>￥ 364</span>
            </div>
            <div class="sure-settlement">结算</div>
        </div>
    </div>
</template>

<script>
export default {
    name:'ShoppingCar',
    data(){
        return{
            unchecked:true,
            checked:false,
            uncheckedAll:true,
            checkedAll:false
        }
    },
    methods:{
        back(){
            this.$router.go(-1)
        },
        choose(){
            this.unchecked=!this.unchecked;
            this.checked=!this.checked;
        },
        chooseAll(){
            this.uncheckedAll=!this.uncheckedAll;
            this.checkedAll=!this.checkedAll;
        }
    }
}
</script>



<style lang='less' scoped>

.handNav{
    width: 100%;
    height: 44px;
    background-color: white;
    position: relative;
    .gobackIcon{
        width: 19px;
        height: 19px;
        position: absolute;
        top: 12.5px;
        left: 11px;
        float: left;
        img{
            width: 100%;
            height: 100%;
        }
    }
    .pageTitle{
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top:0;
        margin: auto;
        width: 155px;
        height: 32px;
        line-height: 32px;
        text-align: center;
        font-family: Arial;
        p{
            font-size: 16px;
            color: rgba(16, 16, 16, 1);
        }
    }
    .icon{
        width: 20px;
        height: 20px;
        position: absolute;
        top: 12.5px;
        right: 21px;
        float: right;
        font-size: 20px;
        line-height: 20px;
        i{
            font-weight: 600;
        }
    }
    
}
.full-reduction{
    width: 100%;
    height:44px ;
    position: relative;
    .full-reduction-chinese{
        width: 81px;
        height: 31px;
        background-color: #BDBDBD;
        font-size: 14px;
        line-height: 31px;
        text-align: center;
        color: rgba(255, 255, 255, 1);
        position: absolute;
        left: 12px;
        top:7px;
    }
    .full-reduction-conditions{
        width: 100px;
        height: 31px;
        line-height: 31px;
        font-size: 14px;
        text-align: center;
        color: #999999;
        position: absolute;
        left: 107px;
        top:7px;
    }
}
.shoppingGoods-box{
    width: 100%;
    min-height: 160px;
    padding-left: 12px;
    padding-right: 14px;
    box-sizing: border-box;
    background-color: white;
    .shoppingGoods{
        width: 100%;
        height: 131px;
        display: flex;
        .xuanzhong{
            width: 34px;
            height: 131px;
            position: relative;
            .unchecked{
                width: 18px;
                height: 18px;
                border-radius: 50%;
                border: 1px solid #bbbbbb;
                position: absolute; /*脱离文档流*/
                top: 50%; /*偏移*/
                margin-top: -9px;
            }
            .checked{
                width: 18px;
                height: 18px;
                line-height: 18px;
                position: absolute; /*脱离文档流*/
                top: 50%; /*偏移*/
                margin-top: -9px;
                font-size: 21px;
                font-weight: 500;
            }
        }
        .shoppingGoodsInfo{
            flex: 1;
            height: 131px;
            position: relative;
            .shopping-img{
                width: 102px;
                height: 102px;
                float: left;
                position: absolute;
                top: 50%;
                left: 0;
                margin-right: 6px;
                margin-top: -51px;
                img{
                    width: 100%;
                    height: 100%;
                }
            }
            .shopping-info{
                width: 207px;
                height: 102px;
                position: absolute;
                right: 0;
                top:50%;
                margin-top: -51px;
                .shopping-info-name{
                    width:207px;
                    height: 40px;
                    line-height: 20px;
                    color: rgba(16, 16, 16, 1);
                    font-size: 14px;
                    text-align: left;
                    font-family: Arial;
                }
                .shopping-info-color{
                    width: 57px;
                    height: 23px;
                    line-height: 23px;
                    color: rgba(153, 153, 153, 1);
                    font-size: 12px;
                    text-align: center;
                    font-family: Arial;
                    margin-top: 1px;
                }
                .shopping-info-priceandnum{
                    position: absolute;
                    bottom: 0;
                    width: 207px;
                    height: 29px;
                    .shopping-info-price{
                        width: 45px;
                        height: 29px;
                        line-height: 29px;
                        color: rgba(242, 61, 82, 1);
                        font-size: 14px;
                        text-align: center;
                        font-family: Arial;
                        line-height: 29px;
                    }
                    .shopping-info-num{
                        width: 90px;
                        height: 26px;
                        border: 1px solid #E5E5E5;
                        position: absolute;
                        bottom: 0;
                        right: 35px;
                        display: flex;
                        .shopping-info-num-reduce{
                            flex: 1;
                            line-height: 26px;
                            text-align: center;
                            font-size: 20px;
                        }
                        .shopping-info-num-count{
                            flex: 1;
                            line-height: 26px;
                            text-align: center;
                            font-size: 14px;
                        }
                        .shopping-info-num-add{
                            flex: 1;
                            line-height: 26px;
                            text-align: center;
                            font-size: 18px;
                        }

                    }
                    .shopping-info-reduce{
                        position: absolute;
                        top: 50%;
                        right: 0;
                        width: 18px;
                        height: 18px;
                        font-size: 18px;
                        line-height: 18px;
                        margin-top: -9px;
                        color: rgba(51, 51, 51, 1);
                    }
                }

            }   
        }
    }
}
.underLine{
            width: 100%;
            height: 1px;
            background-color: #F3F4F5 ;
        }

.settlement{
    width: 100%;
    height: 48px;
    background-color: white;
    position: fixed;
    bottom: 0;
    display: flex;
    .chooseAll{
        flex:1;
        height: 100%;
        padding-left: 12px;
        box-sizing: border-box;
        .unchecked{
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 1px solid #bbbbbb;
            position: absolute;
            top: 50%; 
            margin-top: -9px;
        }
        .checked{
            width: 18px;
            height: 18px;
            line-height: 18px;
            position: absolute;
            top: 50%; 
            margin-top: -9px;
            font-size: 21px;
            font-weight: 500;
        }
        .checked-word{
            width: 29px;
            height: 23px;
            line-height: 23px;
            color: rgba(16, 16, 16, 1);
            font-size: 14px;
            text-align: center;
            font-family: Arial;
            position: absolute;
            top: 50%; 
            left:37px ;
            margin-top: -10px;
        }
    }
    .priceAll{
        flex:1;
        height: 100%;
        line-height: 48px;
        color: rgba(16, 16, 16, 1);
        font-size: 14px;
        text-align: right;
        font-family: Arial;
        padding-right: 18px;
        box-sizing: border-box;
        span{
            font-size: 16px;
            color: rgba(242,61,82,1)
        }
    }
    .sure-settlement{
        flex:1;
        height: 100%;
        background-color: #B0B0B0;
        font-size: 14px;
        line-height: 48px;
        text-align: center;
        color: rgba(16, 16, 16, 1);
    }
}





</style>
